FINS DocuSign System API - Implementation Template
Data mappings
This document provides information generated from the DataWeave scripts included in the project, such as function definitions, variable definitions, and data mapping tables.
Module | Description |
---|---|
map-create-envelope-request | This script maps an incoming create envelope request to DocuSign format. |
map-get-envelope-response | This script maps a DocuSign envelope to the API format. |
map-get-envelope-documents-response | This script maps a DocuSign document header to the API format. |
map-create-envelope-request
This script maps an incoming create envelope request to DocuSign format.
Source:
./src/main/resources/dwl/map-create-envelope-request.dwl
Functions
fun mapTabPosition (tabPosition)
Helper function to map the tab position structure to DocuSign fields.
param
tabPosition
the tab position structure to map
return a JSON object containing the DocuSign position fields
fun mapTabs (tabs)
Helper function to map a list of tabs to the DocuSign structure, where each type of tab is a separate collection. Uses the mapTabPosition function to merge the positional mapping of each tab to the overall result.
param
tabs
a list of document tabs
return a JSON object containing the DocuSign tab lists
Mapping Tables
Maps the API Envelope structure to the DocuSign Envelope structure.
DocuSign property | API property | Description |
---|---|---|
emailSubject | emailSubject | Subject line of the email to send |
emailBlurb | emailBlurb | Body of the email to send |
customFields | customFields.textCustomFields | A list of custom text properties to include in the envelope |
compositeTemplates | compositeTemplates | An exploded representation of the simplified template structure to create the envelope |
compositeTemplates.serverTemplates.templateId | compositeTemplates.templateId | Identifier of a server side template to include in the envelope |
compositeTemplates.inlineTemplates.documents | compositeTemplates.documents | Dynamic document content to include in the envelope |
compositeTemplates.inlineTemplates.recipients | compositeTemplates.recipients | List of recipients to include in the envelope |
status | envelopeStatus | The target status of the created envelope |
map-get-envelope-response
This script maps a DocuSign envelope to the API format.
Source:
./src/main/resources/dwl/map-get-envelope-response.dwl
Functions
fun mapRecipients (recipientList, recipientType)
Helper function to map the DocuSign receipient structure to the API recipient structure.
param
recipientList
the list of DocuSign recipients
paramrecipientType
the type of recipient the list represents
return a JSON array containing the flattened list of recipients in API format
Mapping Tables
Maps the DocuSign Envelope structure to the API Envelope structure.
API property | DocuSign property | Description |
---|---|---|
envelopeId | envelopeId | The DocuSign envelope identifier |
emailSubect | emailSubect | Subject line of the email to send |
emailBlurb | emailBlurb | Body of the email to send |
customFields | customFields.textCustomFields | A list of custom text properties included in the envelope |
documents | documents | Metadata of the documents included in the envelope |
recipients | recipients | List of recipients included in the envelope |
envelopeStatus | status | The target status of the created envelope |
statusLastChangedDate | statusChangedDateTime | The date and time the status of the envelope was last changed |
auditInfo.createdDate | createdDateTime | The date and time the envelope was created |
auditInfo.createdBy | sender.userName | The DocuSign user this envelope was created on behalf of |
auditInfo.updatedDate | lastModifiedDateTime | The date and time the envelope was last modified |
auditInfo.updatedBy | sender.userName | The DocuSign user this envelope was last modified on behalf of |
auditInfo.isDeleted | false | Hard-coded deletion indicator |
map-get-envelope-documents-response
This script maps a DocuSign document header to the API format.
Source:
./src/main/resources/dwl/map-get-envelope-documents-response.dwl
Mapping Tables
Maps the DocuSign Document structure to the API Document structure.
API property | DocuSign property | Description |
---|---|---|
id | documentId | The document identifier assigned upon envelope creation |
name | documentName | The name of the document |
documentGuid | documentGuid | The DocuSign generated identifier for the document |
documentType | Document | Hard-coded value of the document type |
documentStatus | CURRENT | Hard-coded value of the document status |